
#include <stdio.h>
#include <thread>
#include "ffmpeg_frame_any.h"
#include <opencv2/opencv.hpp>

int test(int height, int width, char * data )
{
    std::cout << height << width << std::endl;
    int cv_format = CV_8UC3;
    cv::Mat img(height, width, cv_format, data, width * 3);
    cv::imshow("test", img);
    cv::waitKey(50);
    return 0; 
    
}

int main(int argc, char **argv)
{
    ffmpeg_frame("kinect.h264",50, test);
    getchar();
    return 0;
}
